﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using W.M.Materiel.Application.IServices;
using W.M.Materiel.Domain.Entity;

namespace W.M.Materiel.Read.API.Controllers
{

    [Route("api/[controller]/[action]")]
    [ApiController]
    public class Multistage_price_tableController : ControllerBase
    {
        private readonly IMultistage_price_tableServices multistage_Price_TableServices;

        public Multistage_price_tableController(IMultistage_price_tableServices multistage_Price_TableServices)
        {
            this.multistage_Price_TableServices = multistage_Price_TableServices;
        }

        /// <summary>
        /// 显示售价表信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> GetMultistage_Price_Table()
        {
            var list=await multistage_Price_TableServices.GetMultistage_Price_Table();
            return Ok(list);
        }


        /// <summary>
        /// 反填售价信息表
        /// </summary>
        /// <param name="selling_number"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> GetBillbackfill(int? selling_number)
        {
            var list=await multistage_Price_TableServices.GetBillbackfill(selling_number);
            return Ok(list);
        }
    }
}
